﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DataAccess;

namespace EntityDaoLibrary
{
    public class HisZLInfoDAO:IEntityDAO
    {
        private IDataAccess data;
        public HisZLInfoDAO()
        { 
        }

        public HisZLInfoDAO(IDataAccess data)
        {
            this.data = data;
        }
        #region IEntityDAO 成员

        public void insertEntity(System.Data.DataSet entityData)
        {
            throw new NotImplementedException();
        }

        public void deleteEntity(System.Data.DataSet entityData)
        {
            throw new NotImplementedException();
        }

        public void updateEntity(System.Data.DataSet entityData)
        {
            throw new NotImplementedException();
        }

        public System.Data.DataSet FindByPrimaryKey(object strKeyValue)
        {
            throw new NotImplementedException();
        }

        #endregion

        public DataSet GetZLInfo(string id)
        {
            try
            {
                QueryParameterCollection para;
                DataSet ds = new DataSet();
                string sql = "";
                sql = @"SELECT * FROM YY_SFXXMK WHERE id=@id";
                para = new QueryParameterCollection(1);
                para.Add("@id", id);
                data.ExecuteDataset(sql, para, ds);
                return ds;

            }
            catch (Exception e)
            {

                throw new Exception(e.Message, e);
            }
        }


    }
}
